<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<style>
    section{
        display: flex;
        width: 60%;
        height: 150px;
        background-color: rgba(112, 220, 203, 0.4);
        margin: 0 auto;
    }

    section div:nth-child(1){
        width: 100px;
        height: 150px;
        background-color: red;
    }
    section div:nth-child(2){
        flex:1;
        height: 150px;
        background-color: blue;
    }
    section div:nth-child(3){
        width: 100px;
        height: 150px;
        background-color: green;
    }

    p{
        display: flex;
        width: 600px;
        height: 150px;
        background-color: lightpink;
        margin: 30px auto;
    }
    p span:nth-child(1){
        flex:1;
        background-color: aqua;
    }
    p span:nth-child(2){
        flex:5;
        background-color: #e6ecf7;
    }
    p span:nth-child(3){
        flex:1;
        background-color: yellowgreen;
    }

</style>
<body>
   <section>
       <div>1</div>
       <div>2</div>
       <div>3</div>
   </section>
   <p>
       <span>1</span>
       <span>2</span>
       <span>3</span>
   </p>
</body>
</html>